package com.woniu40.petai_manager.mapper;


import com.woniu40.petai_manager.entity.Permission;
import com.woniu40.petai_manager.vo.PermissionVo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PermissionMapper {
    int deleteByPrimaryKey(Integer permissionId);

    int insert(Permission record);


    List<Permission> selectAll(String permissionName);

    int updateByPrimaryKey(Permission record);

    @Select("select * from t_url_permission where parent_id=-1")
    List<Permission> selectParent();

    List<PermissionVo> selectPermissionVo(List<Integer> permissionIds);

    List<PermissionVo> selectAllPermissionVo();


}